import Vue from 'vue'
import VueRouter from 'vue-router'
// 导入需要的路径
import Reg from '@/views/Reg/Reg.vue'
import Login from '../views/Login/Login.vue'
import Main from '../views/Main/Main.vue'

Vue.use(VueRouter)
// 今后在这个数组中定义路由规则
const routes = [
  { path: '/', component: Main },
  // 注册页面的路由规则
  { path: '/reg', component: Reg },
  // 登录页面的路由规则
  { path: '/login', component: Login }
]

const router = new VueRouter({
  routes
})

export default router
